@mixin wordHidden {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@mixin wordHidden_2 {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

@mixin text-overflow-ellipsis($count) {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: $count;
  text-overflow: ellipsis;
}

@mixin text-overflow-nowrap-ellipsis {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

@mixin bord_bottom($l,$flag) {
  &:before {
    content: "";
    position: absolute;
    left: $l;
    bottom: 0;
    width: 100%;
    height: 1px;
    background-color: #d8d8d8;
  }
  @if ($flag == 1) {
    &:last-child:before {
      display: none;
    }
  }
}

@mixin bord_top {
  &:before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 1px;
    background-color: #d8d8d8;
  }
}

@mixin enlarge($s) {
  &:active {
    transform: scale($s);
    -webkit-transform: scale($s);
  }
}

@mixin iconCode($c) {
  font-family: "iconfont" !important;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  content: $c;
}

@mixin clickA() {
  &:active {
    background-color: #d8d8d8;
  }
}

@mixin wrap {
  height: 100%;
  width: 100%;
  overflow-x: hidden;
  overflow-y: scroll;
}

@mixin transition($time) {
  transition: transform $time,opacity $time;
  -webkit-transition: transform $time,opacity $time;
}

@mixin transform($x,$y) {
  transform: translate($x, $y);
  -webkit-transform: translate($x, $y);
}

@mixin flex-display {
  display: flex;
  display: -webkit-flex;
  display: -ms-flexbox;
}

@mixin flex-size($size) {
  flex: $size;
  -webkit-flex: $size;
  -ms-flex: $size;
}

@mixin flex-vertical {
  flex-direction: column;
  -webkit-flex-direction: column;
  -ms-flex-direction: column;
}

@mixin flex-row {
  flex-direction: row;
  -webkit-flex-direction: row;
  -ms-flex-direction: row;
}

@mixin flex-align-center {
  align-items: center;
  -webkit-align-items: center;
  -ms-flex-align: center;
}

@mixin flex-pack-center {
  justify-content: center;
  -webkit-justify-content: center;
  -ms-flex-pack: center;
}

@mixin absolute {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

@mixin gray_cover{
  background-color: rgba(0,0,0,.3);
}

@mixin clickActive{
  &:active{
    background-color: #cccccc;
  }
}

@mixin keyframes($animationName) {
  @-webkit-keyframes #{$animationName} {
    @content;
  }
  @-moz-keyframes #{$animationName} {
    @content;
  }
  @-o-keyframes #{$animationName} {
    @content;
  }
  @keyframes #{$animationName} {
    @content;
  }
}

@mixin animateName($name,$time){
  animation:$name $time;
  -webkit-animation:$name $time;
}

@mixin btn-small($font,$bc){
  display: inline-block;
  border-radius: 2px;
  margin: 0 8px;
  padding: 6px 12px;
  color: $font;
  background-color: $bc;
  font-size: 14px;
  &:active{
    opacity: .8;
  }
}

.check-input{
  position: absolute;
  top:0;
  left:0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 1;
  + div{
    position: absolute;
    top:0;
    right:0;
    height: 100%;
    width: 30px;
  }
  + div > div{
    position: relative;
    height: 100%;
    width: 100%;
    @include flex-display;
    @include flex-pack-center;
    @include flex-align-center;
    &:before {
      @include iconCode("\e603");
      font-size: 20px;
      color: #cccccc;
    }
  }
  &:checked + div > div:before{
    @include iconCode("\e629");
    font-size: 24px;
    color: #32c832;
  }
}
